//第一版
function objectFactory(){
    var obj=new Object();
    var Constructor=[].shift.call(arguments);
    obj.__proto__=Constructor.prototype;
    Constructor.apply(obj,arguments);
//原型数据继承
//构造函数数据继承
    return obj;
}

function Otaku (name, age) {
    this.strength = 60;
    this.age = age;

    return {
        name: name,
        habit: 'Games',
        strength:this.strength,
        age
    }
}


Otaku.prototype.sayYourName = function () {
    console.log('I am ');
}
var person=new Otaku('zhangsan',22);
console.log(person.name) // Kevin
console.log(person.habit) // Games
console.log(person.strength) // 60
console.log(person.age)
person.sayYourName;
